home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
term
/
vltj5867.lha
/
VLT
/
rexx
/
VLTPhoneShow.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-27
|
2KB
|
79 lines
/** VLTPhoneShow.rexx
*
* Show an entry in the VLT phonebook
*
* By W.G.J. Langeveld, February 1992.
*
**/
/*
* Add libraries if necessary
*/
if show("l", "rexxarplib.library") = 0 then do
check = addlib('rexxsupport.library', 0, -30, 0)
check = addlib('rexxarplib.library', 0, -30, 0)
end
/*
* Determine VLT port and screen name and size
*/
vltport = address()
cols = ScreenCols(vltport)
if cols == -1 then do
vltscreen = ""
cols = ScreenCols()
rows = ScreenRows()
end
else do
vltscreen = vltport
rows = ScreenRows(vltscreen)
end
/*
* Check if we're set up right...
*/
call pragma('W','NULL')
if ~exists("VLTPhoneBook:") then do
"@VLTPhoneSetup.rexx"
exit
end
/*
* Find out which entry
*/
filename = GetFile(80, 50, "VLTPhoneBook:",, "Entry Name:", vltscreen)
if filename == "" then exit
/*
* Open the file
*/
if open(input, filename, "r") = 0 then do
"message (Couldn't read file); delay 1.5; message"
exit
end
/*
* Read it
*/
changes. = ""
do i = 1 to 10
changes.i = readln(input)
if length(changes.i) > 47 then changes.i = substr(changes.i, 1, 47)
end
call close(input)
/*
* Set up the strings
*/
prompts = "Name: " || changes.1
prompts = prompts || "\Address: " || changes.2
prompts = prompts || "\City etc.: " || changes.3
prompts = prompts || "\\Phone Number: " || changes.4
prompts = prompts || "\Modem Init: " || changes.5
prompts = prompts || "\Modem Speed: " || changes.6
prompts = prompts || "\Parity: " || changes.7
prompts = prompts || "\Predial Cmds: " || changes.8
prompts = prompts || "\PostDial Cmds: " || changes.9
prompts = prompts || "\\Notes: " || changes.10
/*
* Put up the display
*/
test = Request(cols - 600, rows - 170, prompts,,, " Okay ", vltscreen)
exit